﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KTool2.Impl;

namespace KTool2.Core
{
    /// <summary>
    /// List of kanji word that already categorize in high, medium, low list base on mem rate
    /// </summary>
    public interface IKanjiWordList
    {
        //List<object> RandmList { get; }
        /// <summary>
        /// Adds new kanji word to list. Auto catogorize the kanji word base on its memrate
        /// </summary>
        /// <param name="kWord">kanji word to be added</param>
        void Add(KanjiWord kWord);

        /// <summary>
        /// Gets list of kanji that has mem rate of 5
        /// </summary>
        List<KanjiWord> HighList { get; }

        /// <summary>
        /// Gets list of kanji that has mem rate of 3 & 4
        /// </summary>
        List<KanjiWord> MediumList { get; }

        /// <summary>
        /// Gets list of kanji that has mem rate of 1 & 2
        /// </summary>
        List<KanjiWord> LowList { get; }

        /// <summary>
        /// Gets number of all kanji words in all list
        /// </summary>
        int Count { get; }

        /// <summary>
        /// Gets a random kanji word from all list
        /// </summary>
        KanjiWord RanDomKanji { get; }

        /// <summary>
        /// Gets a random kanji word from all list regardless to the memrate
        /// </summary>
        KanjiWord FairRanDomKanji { get; }

        ///// <summary>
        ///// Searchs kanji by a key word
        ///// </summary>
        ///// <param name="kWord">key word can be any of kanji word properties</param>
        ///// <returns>list of kanji word found in this list</returns>
        //public List<IKanjiWord> Search(string keyWord);

        //object IKanjiWordList.Current { get; }
        //public bool MoveNext();
        //public void Reset();
        //public IEnumerator<IKanjiWord> GetEnumerator();
        //System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator();

        KanjiWord ElementAt(int i);

        /// <summary>
        /// Shuffle all kanji word in list
        /// </summary>
        void Shuffle();

        ///// <summary>
        ///// Put kWord in a right list after its memrate has changed.
        ///// </summary>
        ///// <param name="kWord">Kanji word to be re-positioned</param>
        //void RePositionWord(KanjiWord kWord);

        /// <summary>
        /// Set new memrate for kanji word
        /// </summary>
        /// <param name="kWord">Kanji word to be set</param>
        /// <param name="newMemrate">New memrate value</param>
        void SetMemrate(KanjiWord kWord, int newMemrate);
    }
}
